package model

import "time"

type GuitarModel struct {
	Id       int64
	Title    string    `xorm:"varchar(155) notnull 'title' comment('标题')" json:"title"`
	CreateAt time.Time `xorm:"'create_at' created" json:"create_at"`
}

func (GuitarModel) TableName() string {
	return "guitar"
}

type GuitarImageModel struct {
	Id       int64
	GuitarId int64     `xorm:"notnull 'guitar_id'" json:"guitar_id"`
	Url      string    `xorm:"varchar(255) notnull 'url' comment('地址')" json:"url"`
	CreateAt time.Time `xorm:"'create_at' created"`
}

func (GuitarImageModel) TableName() string {
	return "guitar_image"
}

type GuitarJoinImageGroup struct {
	GuitarModel      `xorm:"extends"`
	GuitarImageModel `xorm:"extends"`
}

func (GuitarJoinImageGroup) TableName() string {
	return "guitar"
}
